package cn.juque.workflow.api.enums;

import cn.juque.common.constants.BaseMessageEnum;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>WorkflowMsgEnum</li>
 * </ul>
 * @date 2023-01-29 10:00:12
 **/
public enum WorkflowMsgEnum implements BaseMessageEnum {

    /**
     * enum
     */
    REJECT_FAIL_FIRST_USER("WF-0001", "第一个用户节点无法驳回"),
    TASK_MISSING_OR_FINISH("WF-0002", "任务不存在或已完成"),

    CANDIDATE_USER_OUT_LIMIT("WF-0003", "候选人超出范围"),

    UPDATE_FAIL_BY_NOT_REJECT("WF-0004", "未被驳回的流程不可以修改"),
    ;

    private final String code;

    private final String msg;

    WorkflowMsgEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
